package com.newsnetwork.api.controller.article;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.io.FileNotFoundException;

/**
 * @author HuangDekai
 * @date 2022/11/19 15:05
 * @Description: 静态化文章业务的controller
 */
@Api(value = "静态化文章业务的controller", tags = {"静态化文章业务的controller"})
@RequestMapping("article/html")
public interface ArticleHTMLControllerApi {
    /**
     * 下载静态化页面
     * @param articleId 文章id
     * @param articleMongoId 文章在MongoDB中对应的id
     * @return 状态码
     */
    @GetMapping("download")
    @ApiOperation(value = "下载静态化页面", notes = "下载静态化页面", httpMethod = "GET")
    Integer download(String articleId, String articleMongoId) throws FileNotFoundException;

    /**
     * 删除静态化页面
     * @param articleId 文章id
     * @return 状态码
     */
    @GetMapping("delete")
    @ApiOperation(value = "删除静态化页面", notes = "删除静态化页面", httpMethod = "GET")
    Integer delete(String articleId) throws FileNotFoundException;
}
